import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-05-04
 * Time: 16:13
 */
public class TestDemo {
    public static void main(String[] args) {
        List<Card> cardList=TestCard.buyCard();
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入洗牌次数:>");
        int count=scanner.nextInt();
        while(count>0){
            TestCard.shuffle(cardList);
            //System.out.println(cardList);
            count--;
        }

        List<Card> hand1=new ArrayList<>();
        List<Card> hand2=new ArrayList<>();
        List<Card> hand3=new ArrayList<>();
        List<Card> hand4=new ArrayList<>();
        List<List<Card>> hands=new ArrayList<>();
        hands.add(hand1);
        hands.add(hand2);
        hands.add(hand3);
        hands.add(hand4);
        for (int i = 0; i < 13; i++) {
            for (int j = 0; j < 4; j++) {
                Card card=cardList.remove(0);
                List<Card> hand=hands.get(j);
                hand.add(i,card);
            }
        }
        System.out.println(hand1);
        System.out.println(hand2);
        System.out.println(hand3);
        System.out.println(hand4);
    }
}
